package com.wltt;

import javax.mail.MessagingException;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.List;

public class Main {

    public static void main(String[] args) throws MessagingException, GeneralSecurityException {

        String host = "smtp.qq.com";
        Integer port = 465;
        Boolean sslEnable = true;
        String mailAccount = "11111111111@qq.com";
        String mailPassword = "dfsdfdgdgdfgdfgdf";

        String mailTitle = "测试邮件工具类";
        String mailContent = "<meta charset=\"UTF-8\"><h1>我是大标题</h1>\n" +
                "<h2>研发进度</h2>\n" +
                "<ol>\n" +
                "<li>\n" +
                "<h5>功能设计</h5>\n" +
                "<ul>\n" +
                "<li>\n" +
                "<p>需求梳理</p>\n" +
                "<p>现有需求已完成</p>\n" +
                "</li>\n" +
                "<li>\n" +
                "<p>数据库设计</p>\n" +
                "<p>已完成，后期根据需求可能进行微调</p>\n" +
                "</li>\n" +
                "</ul>\n" +
                "</li>\n" +
                "</ol>\n" +
                "</meta>";
        List<String> receiveMails = new ArrayList<>();
        receiveMails.add("yangguoliang@wltt.com");
        try {
            MailSendUtil.sendMail(host, port, sslEnable, mailAccount, mailPassword, mailTitle, mailContent, receiveMails);
        } catch (MessagingException e) {
            e.printStackTrace();
        }
    }
}
